package com.tr.rentcar.controller.home;

import java.io.IOException;
import java.sql.SQLException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.tr.rentcar.model.bean.ForegrondWebset;
import com.tr.rentcar.model.dao.FWDao;

/**
 * Servlet implementation class AboutUsControlle
 */
@WebServlet("/aboutus")
public class AboutUsController extends HttpServlet {
	FWDao fw=new FWDao();
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		try {
			ForegrondWebset f=fw.find();
			System.out.println(f);
			request.setAttribute("f", f);
			request.getRequestDispatcher("WEB-INF/jsp/about_us.jsp").forward(request, response);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		doGet(request, response);
	}

}
